'\"macro stdmacro
.\"
.\" Copyright (c) 2022 Ken McDonell.  All Rights Reserved.
.\"
.\" This program is free software; you can redistribute it and/or modify it
.\" under the terms of the GNU General Public License as published by the
.\" Free Software Foundation; either version 2 of the License, or (at your
.\" option) any later version.
.\"
.\" This program is distributed in the hope that it will be useful, but
.\" WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
.\" or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
.\" for more details.
.\"
.\"
.TH PMAPUTLOG 3 "PCP" "Performance Co-Pilot"
.SH NAME
\f3pmaPutLog\f1 \- direct write of the next record from an archive file
.SH "C SYNOPSIS"
.ft 3
.ad l
.hy 0
#include <pcp/pmapi.h>
.br
#include <pcp/libpcp.h>
.br
#include <pcp/archive.h>
.sp
void pmaPutLog(FILE *\fIf\fP, __int32_t *\fIrbuf\fP);
.sp
cc ... \-lpcp_archive \-lpcp
.hy
.ad
.ft 1
.SH CAVEAT
This documentation is intended for internal Performance Co-Pilot
(PCP) developer use.
.PP
These interfaces are not part of the PCP APIs that are guaranteed to
remain fixed across releases, and they may not work, or may provide
different semantics at some point in the future.
.SH DESCRIPTION
.de CR
.ie t \f(CR\\$1\fR\\$2
.el \fI\\$1\fR\\$2
..
This is a cut-down version of the archive record reading routines
from libpcp, that writes the next physical record on the stream
identified by
.IR f .
.PP
The record is already formatted in
.IR rbuf ,
including the setup of the record header length and trailer length,
and
.I rbuf
must be in network byte-order.
.PP
There is no checking, so the record format must be correct and
match the semantics of which ever physical file (metadata or
data volume) that is associated with
.IR f .
.SH DIAGNOSTICS AND RETURN VALUES
The return value is 0 if all is well, else
some error code less than zero.
.SH SEE ALSO
.BR pmaGetLog (3)
and
.BR PMAPI (3).
